const mongoose = require('mongoose');
const Schema = mongoose.Schema;

let cartSchema = new Schema({
  username: String,
  userId: String,
  doubanId: String,
  film: {
    original_title: String,
    coverurl: String,
    collect_count: Number,
    wish_count: Number,
    genres: [String],
    price: Number,
    poster: String,
    _id: 0
  }
}, {versionKey: false, timestamps: true});
module.exports = mongoose.model('cart', cartSchema)
;
